package com.leo.train.business.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.Date;

/**
 * 火车车厢实体
 */

@Data
public class Carriage {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    @NotNull(message = "【车次编号】不能为空")
    private String trainCode; // 车次编号
    @NotNull(message = "【厢号】不能为空")
    private Integer index; // 厢号
    @NotNull(message = "【座位类型】不能为空")
    private String seatType;  // 座位类型
    private Integer seatCount; // 座位数量
    @NotNull(message = "【座位行数】不能为空")
    private Integer rowCount; // 座位行数
    private Integer colCount; // 座位列数
    private Date createTime;
    private Date updateTime;
}
